#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll n = 4000000000;
ll ans = 0;
int main() {
  ll f1=1, f2=2;
  while(f1<n&&f2<n) {
    cout<<f1<<endl;
    cout<<f2<<endl;
    if(!(f1%2))ans+=f1;
    if(!(f2%2))ans+=f2;
    f1+=f2;
    f2+=f1;
  }
  cout<<ans<<endl;
}
